<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>跑马灯</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        
        .box{
            width: 1200px;
            height: 300px;
            border: 5px solid #666;
            margin: 0 auto;
            margin-top: 50px;
            overflow: hidden;
        }
        li{
            display: inline-block;
            margin-left: -4px;
            list-style: none;
        }
        li:first-child{
            margin-left: 0;
        }
        .box img{
            width: 300px;
            height: 300px;
        }
        .box ul{
            width: 3000px;
            animation: pmd 8s  infinite;
            
        }
        /* 动画暂停 */
        .box:hover ul{
            animation-play-state: paused;
        }
        
        @keyframes pmd{
            0%{
                transform: translateX(0px);
            }
            50%{
                transform: translateX(-900px);
            }
            100%{
                transform:translateX(-1800px) ;
            }
        }
    </style>
</head>
<body>
    <div class="box">
        <ul>
            <li><a href="#"><img src="./image/1.png" alt=""></a></li>
            <li><a href="#"><img src="./image/2.png" alt=""></a></li>
            <li><a href="#"><img src="./image/3.png" alt=""></a></li>
            <li><a href="#"><img src="./image/4.png" alt=""></a></li>
            <li><a href="#"><img src="./image/5.png" alt=""></a></li>
            <li><a href="#"><img src="./image/6.png" alt=""></a></li>
            <li><a href="#"><img src="./image/1.png" alt=""></a></li>
            <li><a href="#"><img src="./image/2.png" alt=""></a></li>
            <li><a href="#"><img src="./image/3.png" alt=""></a></li>
            <li><a href="#"><img src="./image/4.png" alt=""></a></li>
        </ul>
    </div>
</body>
</html>